﻿using IM.Easy.AuthorizationServices.Dtos;
using IM.Easy.Core.Result;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IM.Easy.AuthorizationServices.IServices
{
    public interface IIdentityService
    {
        /// <summary>
        /// 获取登录用户
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        ApiResult<LoginUser> GetLoginUser(LoginInput input);

        /// <summary>
        /// 绑定登录用户的角色
        /// </summary>
        /// <returns></returns>
        void BindRoles(LoginUser user);

        /// <summary>
        /// 绑定登录用户的权限
        /// </summary>
        /// <returns></returns>
        void BindPermission(LoginUser user);

        /// <summary>
        /// 颁发token
        /// </summary>
        /// <returns></returns>
        string IssureAccessToken(LoginUser input);
    }
}
